/**
 * 用户登录成功后返回的参数
 */
export interface UserData {
  userId: string,
  userName: string,
  employeeId: string,
  roleType: string,
  roleName: string,
  levelType: string,
  levelName: string,
  companyId: string,
  companyName: string

}

// 车辆详情
export interface UserDetail {
  prodectNo: string,//产品编号
  prodectName: string,//产品名称
  serveAgingNo: string,//是否生效
  carAge: string,//车的年纪
  carTypeName: string,//车的类型
  accName: string,//客户名称
  channelName: string,//渠道名称
  suggestAmt: number//价格
}

//更新车辆时传过去的数据存储接口
export interface CarMessage {
  uuid: string,
  carNo: string,
  carName: string,
  typeNo: string,
  typeName: string,
  markNo: string,
  markName: string,
  seriesNo: string,
  serveNo: string,
  seriesName: string,
  styleNo: string,
  systemCode: string,
  strleName: string,
  localityNo: string,
  localityName: string,
  licenseNumber: string,
  engineNo: string,
  plateNumber: string,
  registerDate: string,
  buyDate: string,
  carAge: string,
  expDate: string,
  expMileage: string,
  average: string,
  remark: string,
  status: string,
  accNo: string,
  accNoName: string,
  createUserUuid: string,
  createDate: string,
  modiUserUuid: string,
  modiDate: string,
  storeNo: string,
  storeName: string,
  report_data_url:string,
  entityNo:string,
  orderNo: string
}

//通过车型库查车型
export interface cartypeRelation {
  codeName: string,
  companyId: string,
  entityCode: string,
  entityType: string,
  gmtCreate: string,
  gmtModify: string,
  groupEntityCode: string,
  id: string,
  objectCode: string,
  otherEntityCode: string,
  otherEntityCodeName: string,
  otherEntityType: string,
  otherEntityTypeName: string,
  relationCode: string,
  relationName: string,
  typeName: string,
}


/**
 * API接口对象
 */
export interface Api {
  id: string,
  groupEntityCode: string,
  entityCode: string,
  codeName: string,
  entityType: string,
  typeName: string,
  theirEventCode: string,
  theirEventName: string,
  interfaceEnglish: string,
  interfaceChinese: string,
  gmtCreate: string,
  gmtModify: string
}

/**
 * 经销协议产品数据
 */
export interface Protocol {
  agreementName: string,
  agreementNo: string,
  channelName: string,
  channelNo: string,
  companyId: string,
  contractDate: string,
  createDate: string,
  createUserUuid: string,
  effectiveDate: string,
  entityNo: string,
  expiryDate: string,
  modeDate: string,
  modiUserUuid: string,
  relatedStatus: string,
  remark: string,
  status: string,
  termOfAgreement: string,
  typeCode: string,
  typeName: string
}


/**
 * 存储链头链尾数据
 */
export interface Chain {
  chainHead: string,
  chainTail: string,
  codeName: string,
  codeValue: string,
  codeValueName: string,
  entityCode: string,
  entityNo: string,
  entityType: string,
  gmtCreate: string,
  gmtModify: string,
  id: string,
  propertyCode: string,
  propertyCodeName: string,
  typeName: string,
  isRoot: string,
  sceneCode: string
}

/**
 * 存储系统数据
 */
export interface SystemInfo {
  companyId: string,
  createDate: string,
  createUserUuid: string,
  modiDate: string,
  modiUserUuid: string,
  remark: string,
  status: string,
  typeCode: string,
  typeName: string,
  unitName: string,
  unitNo: string,
  uuid: string,
}

/**
 * 存储订单信息
 */
export interface OrderInfo {
  orderNo: string
}


export interface Sphinx {
  userData: UserData,
  api: Api[],
  UserDetail: UserDetail,
  CarMessage: CarMessage,
  cartypeRelation: cartypeRelation,
  Protocol: Protocol,
  Chain: Chain,
  SystemInfo: SystemInfo,
  OrderInfo: OrderInfo,
  imgUrls: string[]
  selectedItemData: [],
  parentEntity: [{entityCode: string,childCode: string}],
  routerPath: string[],
  prevOpt: any,
  prevOptEntity: any,
  currentOptEntity: any,
  prevUrl: string,
  serverGeneralStat: boolean;
}


function state(): Sphinx {
  return <Sphinx>{
    userData: {},
    api: [{}],
    UserDetail: {},
    CarMessage: {},
    cartypeRelation: {},
    Protocol: {},
    Chain: {},
    SystemInfo: {},
    OrderInfo: {},
    imgUrls: [],
    selectedItemData: [],
    parentEntity: [{}],
    routerPath: [],
    prevOpt:{},
    prevOptEntity:{},
    currentOptEntity:{},
    prevUrl: '',
    serverGeneralStat: false
  };
};

export default state;
